import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'index',
    component: () => import('@/views/IndexView.vue')
  }
  , {
    // 登录
    path: '/login',
    name: 'login',
    component: () => import('@/views/LoginView.vue')
  },
  {
    // 忘记密码
    path: '/forgetPassword',
    name: 'forgetPassword',
    component: () => import('@/views/ForgetPasswordView.vue')
  }
  , {
    // 注册
    path: '/regist',
    name: 'regist',
    component: () => import('@/views/RegistView.vue')
  }
  , {
    // 首页列表
    path: '/memberNews',
    name: 'memberNews',
    component: () => import('@/views/MemberNewsListView.vue')
  }
  , {
    // 用户信息
    path: '/memberUserInfo',
    name: 'memberUserInfo',
    component: () => import('@/views/MemberUserInfoView.vue')
  }
  , {
    // 收货地址
    path: '/memberAddress',
    name: 'memberAddress',
    component: () => import('@/views/MemberAddressView.vue')
  }
  , {
    // 我的订单
    path: '/memberOrder',
    name: 'memberOrder',
    component: () => import('@/views/MemberOrderView.vue')
  }
  , {
    // 我的收藏
    path: '/memberCollect',
    name: 'memberCollect',
    component: () => import('@/views/MemberCollectView.vue')
  }
  ,
  {
    // 管理页面
    path: '/admin',
    name: 'admin',
    component: () => import('@/views/AdminControllerView.vue')

  },
  {
    // 用户页面
    path: '/user',
    name: 'user',
    component: () => import('@/views/UserControllerView.vue')
  },
  {
    // 商品搜索页面
    path: '/search',
    name: 'search',
    component: () => import('@/views/ProductSearchView.vue')
  },
  {
    //购物车
    path: '/buycar',
    name: 'buycar',
    component: () => import('@/views/BuyCarView.vue')
  },
  {
    //购物车确认支付
    path: '/buycarTwo',
    name: 'buycarTwo',
    component: () => import('@/views/BuyCarTwoView.vue')
  },
  {
    //购物车支付
    path: '/buycarThree',
    name: 'buycarThree',
    component: () => import('@/views/BuyCarThreeView.vue')
  },
  {
    // 商品详情
    path: '/productDetail',
    name: 'productDetail',
    component: () => import('@/views/ProductView.vue')
  }
]

const router = new VueRouter({
  routes
})


export default router